<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>搜索中心</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../script/vant/index.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="css/common.css" />
    <link rel="stylesheet" type="text/css" href="css/search.css" />
    <link rel="stylesheet" type="text/css" href="css/home_orderlist.css" />
    <link rel="stylesheet" type="text/css" href="css/product.css" />
    <style>
        .van-field__left-icon .van-icon,
        .van-field__right-icon .van-icon {
            font-size: 18px;
        }

        .van-field__control[type=search] {
            height: 1.4rem;
        }

        .orderlist {
            margin-top: 15px;
        }

        .history_box {
            display: flex;
            justify-content: flex-start;
            flex-wrap: wrap;
        }
    </style>
</head>

<body>
    <div id="app">

        <van-sticky>
            <div class="sousuo">
                <van-search shape="round" v-model="product.keywords" placeholder="请输入商品名称/买家名称/订单编号"
                    @search="onSearch" />
            </div>
        </van-sticky>
        <div class="sousuo_history">
            <div class="his_title">
                搜索历史<span @click="handClearHistory">清除搜索历史</span>
            </div>
            <div class="history_box">
                <van-tag type="primary" round plain v-for="item in history" :key="item" @click="handQuickSearch(item)"
                    style="padding: 2px 4px 2px 10px;
                        margin-right: 10px;">
                    <span v-text="item"></span>
                </van-tag>
            </div>
        </div>
        <div v-if="currentType === 'product'">
            <div class="orderlist" v-if="product.list.length > 0">
                <div class="order_list_item">
                    <div class="order_product">
                        <ul class="aui-list aui-media-list" style="background-size:100% 0px; border: none;">
                            <li class="aui-list-item" style="border: none; background-size:100% 0px;"
                                v-for="item in product.list">
                                <div class="aui-media-list-item-inner btn_line">
                                    <div class="aui-list-item-media">
                                        <div v-if="item.Status==6" class="nonumber"><span>售罄</span></div>
                                        <div v-if="item.Status==5" class="nonumber"><span>已下架</span></div>
                                        <div v-if="item.Status==0" class="nonumber"><span>暂存</span></div>
                                        <div v-if="item.Status==1" class="nonumber"><span>审核中</span></div>
                                        <div v-if="item.Status==3" class="nonumber"><span>审核拒绝</span></div>
                                        <div v-if="item.SaleActivityLimitCount>0" class="xiangou">
                                            限购{{item.SaleActivityLimitCount}}件</div>
                                        <img :src="item.CoverImage">
                                    </div>
                                    <div class="aui-list-item-inner">
                                        <div class="pro-list-item-title aui-ellipsis-2"
                                            v-on:click="do_opendetail(item.ID)">
                                            {{item.Name}}
                                        </div>
                                        <div class="pro_type">
                                            <div class="pro_type_item fl aui-ellipsis-1">型号名称：{{item.TypeTitle}}
                                            </div>
                                            <div class="pro_type_item textalign_r fr aui-ellipsis-1">
                                                剩余库存：{{item.Stock}}</div>
                                        </div>
                                        <div class="pro_price_box">
                                            <!-- 会员 -->
                                            <span v-if="item.IsMemberPrice && !item.IsSaleActivityPrice"
                                                class="redbgcolor huiyuan_point">会员</span>
                                            <!-- 活动 -->
                                            <span v-if="item.IsSaleActivityPrice" class="redcolor hd_point">活动</span>
                                            <span v-if="item.IsMemberPrice && !item.IsSaleActivityPrice"
                                                class="redcolor price">￥<label>{{item.MemberPrice}}</label></span>
                                            <span v-if="item.IsSaleActivityPrice"
                                                class="redcolor price">￥<label>{{item.SaleActivityPrice}}</label></span>
                                            <span v-if="!item.IsMemberPrice&&!item.IsSaleActivityPrice"
                                                class="redcolor price">￥<label>{{item.SalePrice}}</label></span>
                                            <label
                                                v-if="item.IsMemberPrice||item.IsSaleActivityPrice"><s>￥{{item.SalePrice}}</s></label>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>

                </div>
            </div>
            <van-empty description="暂无数据" v-if="product.list.length <= 0" />
        </div>
        <div v-if="currentType === 'order'">
            <!-- <div class="sousuo">
                <van-search shape="round" v-model="product.keywords" placeholder="请输入商品名称/买家名称/订单编号" />
            </div>
            <div class="sousuo_history">
                <div class="his_title">
                    搜索历史<span>清除搜索历史</span>
                </div>
                <div class="history_box">
                    <ul>
                        <li class="fl" v-for="item in product.history">
                            <span v-text="item"></span>
                        </li>
                    </ul>
                </div>
            </div> -->
            <div v-if="orderlist.length>0" class="orderlist">
                <div class="order_list_item" v-for="item in orderlist">
                    <div class="gwc_item_name">
                        <div class="gwc_item_title">
                            <!-- <div v-if="item.OrderStatus==" class="order_num "><span>{{item.OrderStatusDesc}}...</span></div> -->
                            <div class="order_num "><span>{{item.OrderStatusDesc}}...</span></div>
                            <span class="item_title_type">{{item.AddTimeDesc}}</span>
                        </div>
                    </div>
                    <div class="order_product">
                        <ul class="aui-list aui-media-list" style="background-size:100% 0px; border: none;">
                            <li v-if="item.ProductList!=undefined&&item.ProductList.length==1" v-for="item2 in item.ProductList" class="aui-list-item" style="border: none;" v-on:click="open_order_detail(item.ID)">
                                <div class="aui-media-list-item-inner btn_line">
                                    <div class="aui-list-item-media">
                                        <img :src="item2.ProductCoverImg">
                                    </div>
                                    <div class="aui-list-item-inner">
                                        <div class="pro-list-item-title aui-ellipsis-2">
                                            {{item2.Name}}
                                        </div>
                                    </div>
                                    <div class=" pro_price" style="margin: 12px 0 0 0;">
                                        <div class="item_price">
                                            ￥<span>{{item2.GoodsSalePrice==''?0:item2.GoodsSalePrice}}</span>
                                        </div>
                                        <div class="productNum">共{{item2.Quantity}}件</div>
                                    </div>
                                </div>
                            </li>
                            <li v-if="item.ProductList!=undefined&&item.ProductList.length>1" class="aui-list-item"  style="border: none; position: relative;" v-on:click="open_order_detail(item.ID)">
                                <div class="pro_total">
                                    <div class="item_price">
                                        ￥<span>{{item.AllPrice}}</span>
                                    </div>
                                    <div class="productNum">共{{item.AllQuantity}}件</div>
                                </div>
                                <div class="aui-media-list-item-inner btn_line proInfo">
                                    <ul class="aui-tab-item" style="width:100%;">
                                        <li class="proli" v-for="item2 in item.ProductList">
                                            <div class="aui-list-item-media list-item-pic">
                                                <img :src="item2.ProductCoverImg">
                                            </div>
                                        </li>
                                        <li class="proli">
                                            <div class="aui-list-item-media list-item-pic">
                                            </div>
                                        </li>
                                    </ul>
                                </div>
    
                            </li>
    
                        </ul>
                        <div class="order_pro_fw">
                            <div class="order_msg">
                                <div class="msg_item">
                                    <div class="msgitem_title fl">配送地址</div>
                                    <div class="msgitem_dec fr">{{item.AddressDetailInfo}}</div>
                                </div>
                                <div class="msg_item">
                                    <div class="msgitem_title fl">预约送达时间</div>
                                    <div class="msgitem_dec fr">{{item.AppointmentTime}}-{{item.AppointmentEndTime}}</div>
                                </div>
                                <div class="msg_item">
                                    <div class="msgitem_title fl">联系买家</div>
                                    <div class="msgitem_dec fr" v-on:click="tel_phone(item.UserPhoneNumber)">{{item.UserName==''?'--':item.UserName}}<i v-if="item.UserPhoneNumber" class="icon iconfont icon-dianhua1"></i></div>
                                </div>
                                <div class="msg_item">
                                    <div class="msgitem_title fl">备注信息</div>
                                    <div class="msgitem_dec fr aui-ellipsis-1">{{item.UserNote}}</div>
                                </div>
                            </div>
                            <!-- <div v-if="item.OrderStatus==1" class="order_pro_fk">
                                <div class="or_pro_rgt">
                                    <div class="or_pro_fk" v-on:click="do_removeorder(item.ID)">取消订单</div>
                                    <div class="or_pro_delete" v-on:click="open_editfeiyong(item.ID,item.ShipRateAmount,item.ShipTimeAmount,item.PackingFee,item.AllPrice)">修改费用</div>
                                </div>
                            </div>
                            <div v-if="item.OrderStatus==5" class="order_pro_fk">
                                <div class="or_pro_rgt">
                                    <div class="or_pro_fk" v-on:click="open_send(item.ID,item.AllQuantity,item.AllWeight,item.AddressDetailInfo)">发货</div>
                                </div>
                            </div> -->
                        </div>
                    </div>
    
                </div>
            </div>
        
    
            <div v-if="orderlist.length<=0" class="noshuju">
                <van-empty description="暂无数据" />
            </div>




        </div>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<!-- <script type="text/javascript " src="../script/vue.js "></script> -->
<script type="text/javascript " src="../script/vant/vue.js"></script>
<script type="text/javascript " src="../script/vant/vant.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript " src="js/search_frm.js"></script>
<script type="text/javascript">
</script>

</html>